scripts to simulate ec2 resources and test cloudwatch alarms#3
Open
0xhitesh-91 wants to merge 1 commit intomvp-rockets:masterfrom
Open
Conversation
bhattisatish
requested changes
Feb 18, 2025
| AWS_REGION=${AWS_REGION:-"ap-south-1"} # Default to ap-south-1 if not set | ||
|
|
||
| # Check if AWS credentials are provided through environment variables | ||
| if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ]; then |
Member
There was a problem hiding this comment.
We don't use this variables.
Just check aws sts get-caller-identity if you need. See https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
| fi | ||
|
|
||
| # Define an array of log groups and their corresponding log streams | ||
| log_groups_and_streams=( |
Member
There was a problem hiding this comment.
Source this from the env/.env.<environment> file. Which environment we want to validated should be the first argument for the scripts.
e.g. check_cloudwatch_logs.sh production. Check how we are loding the env files in deploy.sh
| echo " --parallel Run the disk load simulation on all instances in parallel." | ||
| echo | ||
| echo "Example:" | ||
| echo " $0 --aws-profile 474888828713_AdministratorAccess --region ap-southeast-1" |
Member
There was a problem hiding this comment.
Don't hardcode the profiles in the script. We expect the user to set this up before calling the script.
For e.g.
AWS_PROFILE=prj-env simulate_volume_load.sh qa
| } | ||
|
|
||
| # Default values | ||
| AWS_PROFILE="" |
Member
There was a problem hiding this comment.
Same comment as simulate_volume_load.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.